// pages/travel/travel.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    setting: getApp().globalData.setting,
    markers: [{
        id: 1,
        title: '浙江工业职业技术学院',
        label: '浙江工业职业技术学院',
        longitude: 120.577955,
        latitude: 30.030981,
        iconPath: '/images/icon/学校.png',
        width: "28px",
        height: "32px"
      },
      {
        id: 2,
        title: '花语江南',
        label: '花语江南',
        longitude: 120.580895,
        latitude: 30.029383,
        iconPath: '/images/icon/住宅小区.png',
        width: "28px",
        height: "32px"
      },
      {
        id: 3,
        title: '凤林地铁站',
        label: '凤林地铁站',
        longitude: 120.581710,
        latitude: 30.036777,
        iconPath: '/images/icon/上海地铁.png',
        width: "28px",
        height: "32px"
      },
    ],
    polylines: [{
      points: [{
        longitude: 120.577955,
        latitude: 30.030981,
      }, {
        longitude: 120.580895,
        latitude: 30.029383,
      }, {
        longitude: 120.581710,
        latitude: 30.036777,
      }, {
        longitude: 120.577955,
        latitude: 30.030981,
      }],
      color: '#f00',
      width: 10
    }, {
      points: [{
        longitude: 120.578955,
        latitude: 30.030981,
      }, {
        longitude: 120.581895,
        latitude: 30.029383,
      }, {
        longitude: 120.582710,
        latitude: 30.036777,
      }, {
        longitude: 120.578955,
        latitude: 30.030981,
      }],
      color: '#0f0',
      width: 10
    }],
    polygons: [{
      points: [{
        longitude: 120.569286,
        latitude: 30.035885,
      }, {
        longitude: 120.591216,
        latitude: 30.036777,
      }, {
        longitude: 120.592332,
        latitude: 30.024888,
      }, {
        longitude: 120.571475,
        latitude: 30.022807,
      },{
        longitude: 120.569286,
        latitude: 30.035885,
      }],
      fillColor:'#ff0'
    }, {
      points: [{
        longitude: 120.578955,
        latitude: 30.030981,
      }, {
        longitude: 120.581895,
        latitude: 30.029383,
      }, {
        longitude: 120.582710,
        latitude: 30.036777,
      }, {
        longitude: 120.589955,
        latitude: 30.030981,
      }],
      fillColor:'#ff0'
    }],
    circles: [
      {
        longitude: 120.578955,
        latitude: 30.030981,
        radius:100,
        fillColor: 'rgba(0.5, 1,0,0)'
      }
    ]
  },

  onLoad(options) {
    this.setData({
      setting: {
        enable3D: true,
        enableTraffic: true,
      }
    })
  },

  onRegionChange(e) {
    console.log(e)
  },

})